package com.project.common.fundamental.service;

import com.project.common.data.Model;
import com.project.common.filter.AbstractFilter;
import com.project.common.pagination.PagedRecord;

import java.io.Serializable;
import java.util.List;

public interface ModelService<K extends Serializable,
        M extends Model<K>, F extends AbstractFilter<K, F>> {
    M getModel(K key);

    List<M> listModel(F filter);

    PagedRecord<M> listModel(F filter, int pageIndex, int pageSize);

}
